home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-02-02 | 1.9 KB | 56 lines | [TEXT/GEOL] |
- Item 2582494 2-Feb-90 10:34PST
-
- From: D0416 Futuresoft System Design,PRT
-
- To: D4453 Technically Soft, Chris Lang,PRT
-
- cc: MACAPP.TECH$ MacApp Technical
-
- Sub: RE-OpenOld
-
- Chris,
-
- RE: “Calling OpenWD with the info given above yields either error
- -35, volume not found, or -120, directory not found.”
-
- I am by no means an expert with the File Manager and perhaps Curtis, who has
- more experience in this area will provide the correct answer. But I did notice
- a possible error in your code.
-
- You do a PBHGetFInfo(@theBlk,false) call to get the theBlk.ioNamePtr and
- theBlk.ioVRefNum. After that you assign in param block (called pb) and call
- PBOpenWD which is giving you an error.
- with Pb do begin { same stuff as above }
- ioNameptr:=theBlk.ioNamePtr;
- ioVRefNum:=theBlk.ioVRefNum;
- ioWDIndex:=0;
- ioWDProcID:=0;
- ioWDVRefNum:=ioVRefNum
- end;
- error:=PBOpenWD(@Pb,false);
-
- Inside Mac says that “You can also specify the directory using a combination of
- partial pathname and directory ID” for PBOpen calls which is what you are doing
- except for one thing. Doesn’t theBlk.ioNamePtr which you assign to pb.ioNamePtr
- contain a _FULL_ pathname to the FILE that you previously got file info? If so
- that would mean you used a FULL pathname to a file instead of a PARTIAL
- pathname to a directory. Hence a “directory/volume not found” error.
-
- I would try the other form of PBOpenWD (according to IM) and just specify
- pb.ioVRefNum and pb.ioWDVRefNum without specifying pb.ioNamePtr (not sure but I
- think you assign it NIL)
- with Pb do begin
- ioNameptr:=NIL;
- ioVRefNum:=theBlk.ioVRefNum;
- ioWDIndex:=0;
- ioWDProcID:=0;
- ioWDVRefNum:=ioVRefNum
- end;
- error:=PBOpenWD(@Pb,false);
-
-
- Hope this isn’t blind leading blind,
- -Ken
-
-
-